﻿using System;
using System.Collections.Generic;

using Microsoft.Xna.Framework;

namespace SmlEngine.UI.Input
{
    public class PlayerIndexEqualityComparer : IEqualityComparer<PlayerIndex>
    {
        private static PlayerIndexEqualityComparer defaultInstance;
        public static PlayerIndexEqualityComparer Default
        {
            get
            {
                if (defaultInstance == null)
                    defaultInstance = new PlayerIndexEqualityComparer();
                return defaultInstance;
            }
        }

        public bool Equals(PlayerIndex x, PlayerIndex y)
        {
            return x == y;
        }

        public int GetHashCode(PlayerIndex obj)
        {
            return obj.GetHashCode();
        }
    }
}
